package com.ideaaedi.commonds.tuple;

import lombok.Data;

/**
 * 对象持有器
 *
 * @author <font size = "20" color = "#3CAA3C"><a href="https://gitee.com/JustryDeng">JustryDeng</a></font> <img
 * src="https://gitee.com/JustryDeng/shared-files/raw/master/JustryDeng/avatar.jpg" />
 * @since 2100.6.8
 */
@Data
public class Holder<T> {
    
    private volatile T value;
    
    /**
     * 快熟创建
     */
    public static <T> Holder<T> of(T value) {
        Holder<T> holder = new Holder<>();
        holder.setValue(value);
        return holder;
    }
}
